{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Find similar storm reports\n",
    "\n",
    "This notebook shows a TFX pipeline that does a semantic search to find duplicate storm reports.\n",
    "This is an example of a Workflow Pipeline that doesn't do any training. Instead, it just sets a TFX pipeline up for inference.\n",
    "\n",
    "The source of our data are preliminary storm reports filed by storm spotters to National Weather Service offices. This dataset has already been manually cleaned, so for illustration, we'll ignore the year/location when doing the search"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\u001b[31mERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.\n",
      "\n",
      "We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.\n",
      "\n",
      "tensorflow-io 0.11.0 requires tensorflow==2.1.0, but you'll have tensorflow 2.1.1 which is incompatible.\n",
      "pandas-profiling 2.8.0 requires visions[type_image_path]==0.4.4, but you'll have visions 0.4.6 which is incompatible.\u001b[0m\n",
      "Note: you may need to restart the kernel to use updated packages.\n"
     ]
    }
   ],
   "source": [
    "%pip install -q google-cloud-bigquery-storage pyarrow==0.16 tfx"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "## CHANGE AS NEEDED\n",
    "BEAM_RUNNER = 'DirectRunner'  # or DataflowRunner\n",
    "PROJECT='ai-analytics-solutions'\n",
    "BUCKET='ai-analytics-solutions-kfpdemo'\n",
    "REGION='us-west1'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Explore data in BigQuery\n",
    "\n",
    "Preview data in BigQuery"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>year</th>\n",
       "      <th>julian_day</th>\n",
       "      <th>latitude</th>\n",
       "      <th>longitude</th>\n",
       "      <th>comments</th>\n",
       "      <th>type</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2019</td>\n",
       "      <td>19</td>\n",
       "      <td>32.49</td>\n",
       "      <td>-85.18</td>\n",
       "      <td>TREES DOWN NEAR THE INTERSECTION OF LEE RD 440...</td>\n",
       "      <td>wind</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2019</td>\n",
       "      <td>43</td>\n",
       "      <td>32.49</td>\n",
       "      <td>-85.13</td>\n",
       "      <td>REPORTS OF TREES DOWN IN VARIOUS LOCATIONS IN ...</td>\n",
       "      <td>wind</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2019</td>\n",
       "      <td>62</td>\n",
       "      <td>32.60</td>\n",
       "      <td>-85.24</td>\n",
       "      <td>CORRECTS PREVIOUS TORNADO REPORT FROM SALEM. U...</td>\n",
       "      <td>wind</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2019</td>\n",
       "      <td>85</td>\n",
       "      <td>32.55</td>\n",
       "      <td>-85.10</td>\n",
       "      <td>A TREE WAS DOWNED ONTO A HOME. (BMX)</td>\n",
       "      <td>wind</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2019</td>\n",
       "      <td>158</td>\n",
       "      <td>32.60</td>\n",
       "      <td>-85.42</td>\n",
       "      <td>TREE DOWN ON A HOME. TIME ESTIMATED FROM RADAR...</td>\n",
       "      <td>wind</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>2019</td>\n",
       "      <td>158</td>\n",
       "      <td>32.51</td>\n",
       "      <td>-85.42</td>\n",
       "      <td>MULTIPLE TREES DOWN ON LEE ROAD 29. TIME ESTIM...</td>\n",
       "      <td>wind</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>2019</td>\n",
       "      <td>158</td>\n",
       "      <td>32.71</td>\n",
       "      <td>-85.18</td>\n",
       "      <td>TREES DOWN IN BEULAH. TIME ESTIMATED FROM RADA...</td>\n",
       "      <td>wind</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>2019</td>\n",
       "      <td>158</td>\n",
       "      <td>32.54</td>\n",
       "      <td>-85.09</td>\n",
       "      <td>MULTIPLE TREES DOWN IN SMITHS STATION. TIME ES...</td>\n",
       "      <td>wind</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>2019</td>\n",
       "      <td>190</td>\n",
       "      <td>32.67</td>\n",
       "      <td>-85.49</td>\n",
       "      <td>TREES DOWN NEAR THE INTERSECTION OF LEE RD 147...</td>\n",
       "      <td>wind</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>2019</td>\n",
       "      <td>217</td>\n",
       "      <td>32.52</td>\n",
       "      <td>-85.07</td>\n",
       "      <td>CORRECTS PREVIOUS TSTM WND DMG REPORT FROM 1 E...</td>\n",
       "      <td>wind</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   year  julian_day  latitude  longitude  \\\n",
       "0  2019          19     32.49     -85.18   \n",
       "1  2019          43     32.49     -85.13   \n",
       "2  2019          62     32.60     -85.24   \n",
       "3  2019          85     32.55     -85.10   \n",
       "4  2019         158     32.60     -85.42   \n",
       "5  2019         158     32.51     -85.42   \n",
       "6  2019         158     32.71     -85.18   \n",
       "7  2019         158     32.54     -85.09   \n",
       "8  2019         190     32.67     -85.49   \n",
       "9  2019         217     32.52     -85.07   \n",
       "\n",
       "                                            comments  type  \n",
       "0  TREES DOWN NEAR THE INTERSECTION OF LEE RD 440...  wind  \n",
       "1  REPORTS OF TREES DOWN IN VARIOUS LOCATIONS IN ...  wind  \n",
       "2  CORRECTS PREVIOUS TORNADO REPORT FROM SALEM. U...  wind  \n",
       "3               A TREE WAS DOWNED ONTO A HOME. (BMX)  wind  \n",
       "4  TREE DOWN ON A HOME. TIME ESTIMATED FROM RADAR...  wind  \n",
       "5  MULTIPLE TREES DOWN ON LEE ROAD 29. TIME ESTIM...  wind  \n",
       "6  TREES DOWN IN BEULAH. TIME ESTIMATED FROM RADA...  wind  \n",
       "7  MULTIPLE TREES DOWN IN SMITHS STATION. TIME ES...  wind  \n",
       "8  TREES DOWN NEAR THE INTERSECTION OF LEE RD 147...  wind  \n",
       "9  CORRECTS PREVIOUS TSTM WND DMG REPORT FROM 1 E...  wind  "
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "%%bigquery\n",
    "SELECT \n",
    "  EXTRACT(YEAR from timestamp) AS year,\n",
    "  EXTRACT(DAYOFYEAR from timestamp) AS julian_day,\n",
    "  latitude, longitude,\n",
    "  comments,\n",
    "  'wind' as type,\n",
    "FROM `bigquery-public-data.noaa_preliminary_severe_storms.wind_reports`\n",
    "LIMIT 10"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>year</th>\n",
       "      <th>julian_day</th>\n",
       "      <th>latitude</th>\n",
       "      <th>longitude</th>\n",
       "      <th>comments</th>\n",
       "      <th>size</th>\n",
       "      <th>type</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2019</td>\n",
       "      <td>177</td>\n",
       "      <td>0.00</td>\n",
       "      <td>-40.40</td>\n",
       "      <td>9134</td>\n",
       "      <td>100</td>\n",
       "      <td>hail</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2019</td>\n",
       "      <td>222</td>\n",
       "      <td>0.00</td>\n",
       "      <td>-5.91</td>\n",
       "      <td>246 REPORTED AT 235 MEADOW VIEW DR... BUTTE MT...</td>\n",
       "      <td>175</td>\n",
       "      <td>hail</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2019</td>\n",
       "      <td>84</td>\n",
       "      <td>32.77</td>\n",
       "      <td>-87.77</td>\n",
       "      <td>LOTS OF HAIL FELL. NOT QUITE THE SIZE OF A GOL...</td>\n",
       "      <td>125</td>\n",
       "      <td>hail</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2019</td>\n",
       "      <td>84</td>\n",
       "      <td>32.77</td>\n",
       "      <td>-87.59</td>\n",
       "      <td>QUARTER SIZE HAIL... MAY HAVE BEEN LARGER. SEV...</td>\n",
       "      <td>100</td>\n",
       "      <td>hail</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2019</td>\n",
       "      <td>73</td>\n",
       "      <td>33.66</td>\n",
       "      <td>-88.11</td>\n",
       "      <td>(BMX)</td>\n",
       "      <td>150</td>\n",
       "      <td>hail</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>2019</td>\n",
       "      <td>136</td>\n",
       "      <td>33.89</td>\n",
       "      <td>-86.75</td>\n",
       "      <td>SEVERAL REPORTS OF DIME TO QUARTER SIZE HAIL I...</td>\n",
       "      <td>100</td>\n",
       "      <td>hail</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>2019</td>\n",
       "      <td>85</td>\n",
       "      <td>31.70</td>\n",
       "      <td>-87.80</td>\n",
       "      <td>TRAINED SPOTTER REPORTS QUARTER SIZED HAIL. RE...</td>\n",
       "      <td>100</td>\n",
       "      <td>hail</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>2019</td>\n",
       "      <td>74</td>\n",
       "      <td>34.29</td>\n",
       "      <td>-85.84</td>\n",
       "      <td>QUARTER SIZE HAIL WAS REPORTED IN THE COLLINSV...</td>\n",
       "      <td>100</td>\n",
       "      <td>hail</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>2019</td>\n",
       "      <td>84</td>\n",
       "      <td>32.73</td>\n",
       "      <td>-86.33</td>\n",
       "      <td>QUARTER-SIZED HAIL MEASURED IN THE TITUS AREA....</td>\n",
       "      <td>100</td>\n",
       "      <td>hail</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>2019</td>\n",
       "      <td>121</td>\n",
       "      <td>32.51</td>\n",
       "      <td>-86.21</td>\n",
       "      <td>QUARTER SIZE HAIL NEAR WALMART ON HIGHWAY 231....</td>\n",
       "      <td>100</td>\n",
       "      <td>hail</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   year  julian_day  latitude  longitude  \\\n",
       "0  2019         177      0.00     -40.40   \n",
       "1  2019         222      0.00      -5.91   \n",
       "2  2019          84     32.77     -87.77   \n",
       "3  2019          84     32.77     -87.59   \n",
       "4  2019          73     33.66     -88.11   \n",
       "5  2019         136     33.89     -86.75   \n",
       "6  2019          85     31.70     -87.80   \n",
       "7  2019          74     34.29     -85.84   \n",
       "8  2019          84     32.73     -86.33   \n",
       "9  2019         121     32.51     -86.21   \n",
       "\n",
       "                                            comments  size  type  \n",
       "0                                              9134    100  hail  \n",
       "1  246 REPORTED AT 235 MEADOW VIEW DR... BUTTE MT...   175  hail  \n",
       "2  LOTS OF HAIL FELL. NOT QUITE THE SIZE OF A GOL...   125  hail  \n",
       "3  QUARTER SIZE HAIL... MAY HAVE BEEN LARGER. SEV...   100  hail  \n",
       "4                                              (BMX)   150  hail  \n",
       "5  SEVERAL REPORTS OF DIME TO QUARTER SIZE HAIL I...   100  hail  \n",
       "6  TRAINED SPOTTER REPORTS QUARTER SIZED HAIL. RE...   100  hail  \n",
       "7  QUARTER SIZE HAIL WAS REPORTED IN THE COLLINSV...   100  hail  \n",
       "8  QUARTER-SIZED HAIL MEASURED IN THE TITUS AREA....   100  hail  \n",
       "9  QUARTER SIZE HAIL NEAR WALMART ON HIGHWAY 231....   100  hail  "
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "%%bigquery\n",
    "SELECT \n",
    "  EXTRACT(YEAR from timestamp) AS year,\n",
    "  EXTRACT(DAYOFYEAR from timestamp) AS julian_day,\n",
    "  latitude, longitude,\n",
    "  comments,\n",
    "  size,\n",
    "  'hail' as type\n",
    "FROM `bigquery-public-data.noaa_preliminary_severe_storms.hail_reports`\n",
    "LIMIT 10"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>year</th>\n",
       "      <th>julian_day</th>\n",
       "      <th>latitude</th>\n",
       "      <th>longitude</th>\n",
       "      <th>comments</th>\n",
       "      <th>office</th>\n",
       "      <th>type</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2019</td>\n",
       "      <td>4</td>\n",
       "      <td>31.62</td>\n",
       "      <td>-85.28</td>\n",
       "      <td>tree damage from a brief tornado about 1.5 mi ...</td>\n",
       "      <td>(TAE)</td>\n",
       "      <td>tornado</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2019</td>\n",
       "      <td>19</td>\n",
       "      <td>32.49</td>\n",
       "      <td>-86.73</td>\n",
       "      <td>*** 2 inj *** corrects previous tornado report...</td>\n",
       "      <td>(BMX)</td>\n",
       "      <td>tornado</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2019</td>\n",
       "      <td>19</td>\n",
       "      <td>32.52</td>\n",
       "      <td>-86.24</td>\n",
       "      <td>*** 4 inj *** a nws storm survey team confirme...</td>\n",
       "      <td>(BMX)</td>\n",
       "      <td>tornado</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2019</td>\n",
       "      <td>19</td>\n",
       "      <td>32.85</td>\n",
       "      <td>-86.15</td>\n",
       "      <td>a nws storm survey team confirmed a tornado of...</td>\n",
       "      <td>(BMX)</td>\n",
       "      <td>tornado</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2019</td>\n",
       "      <td>54</td>\n",
       "      <td>33.06</td>\n",
       "      <td>-88.31</td>\n",
       "      <td>corrects previous tornado report from 3 wsw ga...</td>\n",
       "      <td>(BMX)</td>\n",
       "      <td>tornado</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>2019</td>\n",
       "      <td>54</td>\n",
       "      <td>33.66</td>\n",
       "      <td>-88.06</td>\n",
       "      <td>the tornado touched down just south of crawfor...</td>\n",
       "      <td>(BMX)</td>\n",
       "      <td>tornado</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>2019</td>\n",
       "      <td>54</td>\n",
       "      <td>33.70</td>\n",
       "      <td>-87.98</td>\n",
       "      <td>report of trees down along cody rd. near kingv...</td>\n",
       "      <td>(BMX)</td>\n",
       "      <td>tornado</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>2019</td>\n",
       "      <td>55</td>\n",
       "      <td>33.83</td>\n",
       "      <td>-87.68</td>\n",
       "      <td>an ef-0 tornado touched down in a wooded area ...</td>\n",
       "      <td>(BMX)</td>\n",
       "      <td>tornado</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>2019</td>\n",
       "      <td>55</td>\n",
       "      <td>32.86</td>\n",
       "      <td>-86.18</td>\n",
       "      <td>the tornado touched down just east of cr 40 an...</td>\n",
       "      <td>(BMX)</td>\n",
       "      <td>tornado</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>2019</td>\n",
       "      <td>62</td>\n",
       "      <td>32.47</td>\n",
       "      <td>-86.75</td>\n",
       "      <td>a tornado touched 6 miles northwest of autauga...</td>\n",
       "      <td>(BMX)</td>\n",
       "      <td>tornado</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   year  julian_day  latitude  longitude  \\\n",
       "0  2019           4     31.62     -85.28   \n",
       "1  2019          19     32.49     -86.73   \n",
       "2  2019          19     32.52     -86.24   \n",
       "3  2019          19     32.85     -86.15   \n",
       "4  2019          54     33.06     -88.31   \n",
       "5  2019          54     33.66     -88.06   \n",
       "6  2019          54     33.70     -87.98   \n",
       "7  2019          55     33.83     -87.68   \n",
       "8  2019          55     32.86     -86.18   \n",
       "9  2019          62     32.47     -86.75   \n",
       "\n",
       "                                            comments office     type  \n",
       "0  tree damage from a brief tornado about 1.5 mi ...  (TAE)  tornado  \n",
       "1  *** 2 inj *** corrects previous tornado report...  (BMX)  tornado  \n",
       "2  *** 4 inj *** a nws storm survey team confirme...  (BMX)  tornado  \n",
       "3  a nws storm survey team confirmed a tornado of...  (BMX)  tornado  \n",
       "4  corrects previous tornado report from 3 wsw ga...  (BMX)  tornado  \n",
       "5  the tornado touched down just south of crawfor...  (BMX)  tornado  \n",
       "6  report of trees down along cody rd. near kingv...  (BMX)  tornado  \n",
       "7  an ef-0 tornado touched down in a wooded area ...  (BMX)  tornado  \n",
       "8  the tornado touched down just east of cr 40 an...  (BMX)  tornado  \n",
       "9  a tornado touched 6 miles northwest of autauga...  (BMX)  tornado  "
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "%%bigquery\n",
    "SELECT \n",
    "  EXTRACT(YEAR from timestamp) AS year,\n",
    "  EXTRACT(DAYOFYEAR from timestamp) AS julian_day,\n",
    "  latitude, longitude,\n",
    "  LOWER(comments) AS comments,\n",
    "  REGEXP_EXTRACT(comments, r\"\\([A-Z]+\\)$\") AS office,\n",
    "  'tornado' as type\n",
    "FROM `bigquery-public-data.noaa_preliminary_severe_storms.tornado_reports`\n",
    "LIMIT 10"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "query = \"\"\"\n",
    "WITH wind AS (\n",
    "SELECT \n",
    "  EXTRACT(YEAR from timestamp) AS year,\n",
    "  EXTRACT(DAYOFYEAR from timestamp) AS julian_day,\n",
    "  latitude, longitude,\n",
    "  comments,\n",
    "  'wind' as type\n",
    "FROM `bigquery-public-data.noaa_preliminary_severe_storms.wind_reports`\n",
    "),\n",
    "\n",
    "hail AS (\n",
    "SELECT \n",
    "  EXTRACT(YEAR from timestamp) AS year,\n",
    "  EXTRACT(DAYOFYEAR from timestamp) AS julian_day,\n",
    "  latitude, longitude,\n",
    "  comments,\n",
    "  'hail' as type\n",
    "FROM `bigquery-public-data.noaa_preliminary_severe_storms.hail_reports`\n",
    "),\n",
    "\n",
    "tornadoes AS (\n",
    "SELECT \n",
    "  EXTRACT(YEAR from timestamp) AS year,\n",
    "  EXTRACT(DAYOFYEAR from timestamp) AS julian_day,\n",
    "  latitude, longitude,\n",
    "  comments,\n",
    "  'tornado' as type\n",
    "FROM `bigquery-public-data.noaa_preliminary_severe_storms.tornado_reports`\n",
    ")\n",
    "\n",
    "SELECT * FROM (\n",
    "   SELECT * FROM wind\n",
    "   UNION ALL\n",
    "   SELECT * FROM hail\n",
    "   UNION ALL\n",
    "   SELECT * FROM tornadoes\n",
    ")\n",
    "\"\"\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>year</th>\n",
       "      <th>julian_day</th>\n",
       "      <th>latitude</th>\n",
       "      <th>longitude</th>\n",
       "      <th>comments</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>type</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>hail</th>\n",
       "      <td>5397</td>\n",
       "      <td>5397</td>\n",
       "      <td>5397</td>\n",
       "      <td>5397</td>\n",
       "      <td>5397</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>tornado</th>\n",
       "      <td>1677</td>\n",
       "      <td>1677</td>\n",
       "      <td>1677</td>\n",
       "      <td>1677</td>\n",
       "      <td>1677</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>wind</th>\n",
       "      <td>16064</td>\n",
       "      <td>16064</td>\n",
       "      <td>16064</td>\n",
       "      <td>16064</td>\n",
       "      <td>16064</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          year  julian_day  latitude  longitude  comments\n",
       "type                                                     \n",
       "hail      5397        5397      5397       5397      5397\n",
       "tornado   1677        1677      1677       1677      1677\n",
       "wind     16064       16064     16064      16064     16064"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "## skip_for_export\n",
    "import google.cloud.bigquery as bq\n",
    "df = bq.Client().query(query).result().to_dataframe()\n",
    "df.groupby('type').count()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ingest data\n",
    "\n",
    "We'll use the TFX component BigQueryExampleGen to read in the data."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "tensorflow 2.1.1-dlenv_tfe\n",
      "tfx 0.22.1\n",
      "beam 2.23.0\n"
     ]
    }
   ],
   "source": [
    "import tensorflow as tf\n",
    "print('tensorflow ' + tf.__version__)\n",
    "import tfx\n",
    "print('tfx ' + tfx.__version__)\n",
    "import apache_beam as beam\n",
    "print('beam ' + beam.__version__)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "from tfx.components import BigQueryExampleGen\n",
    "example_gen = BigQueryExampleGen(query=query)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "import os\n",
    "beam_pipeline_args = [\n",
    "    '--runner={}'.format(BEAM_RUNNER),\n",
    "    '--project={}'.format(PROJECT),\n",
    "    '--temp_location=' + os.path.join('gs://{}/noaa_similar_reports/'.format(BUCKET), 'tmp'),\n",
    "    '--region=' + REGION,\n",
    "\n",
    "    # Temporary overrides of defaults.\n",
    "    '--disk_size_gb=50',\n",
    "    '--experiments=shuffle_mode=auto',\n",
    "    '--machine_type=n1-standard-8',\n",
    "]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "WARNING:absl:InteractiveContext pipeline_root argument not provided: using temporary directory /tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6 as root for pipeline outputs.\n",
      "WARNING:absl:InteractiveContext metadata_connection_config not provided: using SQLite ML Metadata database at /tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/metadata.sqlite.\n"
     ]
    }
   ],
   "source": [
    "## skip_for_export\n",
    "from tfx.orchestration.experimental.interactive.interactive_context import InteractiveContext\n",
    "context = InteractiveContext()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "WARNING:apache_beam.runners.interactive.interactive_environment:Dependencies required for Interactive Beam PCollection visualization are not available, please use: `pip install apache-beam[interactive]` to install necessary dependencies to enable all data visualization features.\n"
     ]
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "        if (typeof window.interactive_beam_jquery == 'undefined') {\n",
       "          var jqueryScript = document.createElement('script');\n",
       "          jqueryScript.src = 'https://code.jquery.com/jquery-3.4.1.slim.min.js';\n",
       "          jqueryScript.type = 'text/javascript';\n",
       "          jqueryScript.onload = function() {\n",
       "            var datatableScript = document.createElement('script');\n",
       "            datatableScript.src = 'https://cdn.datatables.net/1.10.20/js/jquery.dataTables.min.js';\n",
       "            datatableScript.type = 'text/javascript';\n",
       "            datatableScript.onload = function() {\n",
       "              window.interactive_beam_jquery = jQuery.noConflict(true);\n",
       "              window.interactive_beam_jquery(document).ready(function($){\n",
       "                \n",
       "              });\n",
       "            }\n",
       "            document.head.appendChild(datatableScript);\n",
       "          };\n",
       "          document.head.appendChild(jqueryScript);\n",
       "        } else {\n",
       "          window.interactive_beam_jquery(document).ready(function($){\n",
       "            \n",
       "          });\n",
       "        }"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "        var import_html = () => {\n",
       "          ['https://raw.githubusercontent.com/PAIR-code/facets/1.0.0/facets-dist/facets-jupyter.html'].forEach(href => {\n",
       "            var link = document.createElement('link');\n",
       "            link.rel = 'import'\n",
       "            link.href = href;\n",
       "            document.head.appendChild(link);\n",
       "          });\n",
       "        }\n",
       "        if ('import' in document.createElement('link')) {\n",
       "          import_html();\n",
       "        } else {\n",
       "          var webcomponentScript = document.createElement('script');\n",
       "          webcomponentScript.src = 'https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/1.3.3/webcomponents-lite.js';\n",
       "          webcomponentScript.type = 'text/javascript';\n",
       "          webcomponentScript.onload = function(){\n",
       "            import_html();\n",
       "          };\n",
       "          document.head.appendChild(webcomponentScript);\n",
       "        }"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/opt/conda/lib/python3.7/site-packages/apache_beam/io/gcp/bigquery.py:1767: BeamDeprecationWarning: options is deprecated since First stable release. References to <pipeline>.options will not be supported\n",
      "  temp_location = pcoll.pipeline.options.view_as(\n",
      "WARNING:apache_beam.io.gcp.bigquery_tools:Dataset ai-analytics-solutions:temp_dataset_3e9ffc24261c43d68771b0f64687de32 does not exist so we will create it as temporary with location=US\n",
      "WARNING:apache_beam.io.tfrecordio:Couldn't find python-snappy so the implementation of _TFRecordUtil._masked_crc32c is not as fast as it could be.\n"
     ]
    }
   ],
   "source": [
    "## skip_for_export\n",
    "ingest_result = context.run(example_gen, beam_pipeline_args=beam_pipeline_args)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object expanded\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">ExecutionResult</span><span class=\"deemphasize\"> at 0x7f1f7778b910</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.execution_id</td><td class = \"attrvalue\">1</td></tr><tr><td class=\"attr-name\">.component</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">BigQueryExampleGen</span><span class=\"deemphasize\"> at 0x7f1f804fcb10</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.inputs</td><td class = \"attrvalue\">{}</td></tr><tr><td class=\"attr-name\">.outputs</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['examples']</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'Examples'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f1f7786a7d0</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">Examples</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'Examples'</span> (uri: /tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/BigQueryExampleGen/examples/1)<span class=\"deemphasize\"> at 0x7f1f800ca450</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class 'tfx.types.standard_artifacts.Examples'&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/BigQueryExampleGen/examples/1</td></tr><tr><td class=\"attr-name\">.span</td><td class = \"attrvalue\">0</td></tr><tr><td class=\"attr-name\">.split_names</td><td class = \"attrvalue\">[\"train\", \"eval\"]</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr></table></td></tr><tr><td class=\"attr-name\">.exec_properties</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['input_config']</td><td class = \"attrvalue\">{\n",
       "  \"splits\": [\n",
       "    {\n",
       "      \"name\": \"single_split\",\n",
       "      \"pattern\": \"\\nWITH wind AS (\\nSELECT \\n  EXTRACT(YEAR from timestamp) AS year,\\n  EXTRACT(DAYOFYEAR from timestamp) AS julian_day,\\n  latitude, longitude,\\n  comments,\\n  'wind' as type\\nFROM `bigquery-public-data.noaa_preliminary_severe_storms.wind_reports`\\n),\\n\\nhail AS (\\nSELECT \\n  EXTRACT(YEAR from timestamp) AS year,\\n  EXTRACT(DAYOFYEAR from timestamp) AS julian_day,\\n  latitude, longitude,\\n  comments,\\n  'hail' as type\\nFROM `bigquery-public-data.noaa_preliminary_severe_storms.hail_reports`\\n),\\n\\ntornadoes AS (\\nSELECT \\n  EXTRACT(YEAR from timestamp) AS year,\\n  EXTRACT(DAYOFYEAR from timestamp) AS julian_day,\\n  latitude, longitude,\\n  comments,\\n  'tornado' as type\\nFROM `bigquery-public-data.noaa_preliminary_severe_storms.tornado_reports`\\n)\\n\\nSELECT * FROM (\\n   SELECT * FROM wind\\n   UNION ALL\\n   SELECT * FROM hail\\n   UNION ALL\\n   SELECT * FROM tornadoes\\n)\\n\"\n",
       "    }\n",
       "  ]\n",
       "}</td></tr><tr><td class=\"attr-name\">['output_config']</td><td class = \"attrvalue\">{\n",
       "  \"split_config\": {\n",
       "    \"splits\": [\n",
       "      {\n",
       "        \"hash_buckets\": 2,\n",
       "        \"name\": \"train\"\n",
       "      },\n",
       "      {\n",
       "        \"hash_buckets\": 1,\n",
       "        \"name\": \"eval\"\n",
       "      }\n",
       "    ]\n",
       "  }\n",
       "}</td></tr><tr><td class=\"attr-name\">['custom_config']</td><td class = \"attrvalue\">None</td></tr><tr><td class=\"attr-name\">['_beam_pipeline_args']</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\">--runner=DirectRunner</td></tr><tr><td class=\"attr-name\">[1]</td><td class = \"attrvalue\">--project=ai-analytics-solutions</td></tr><tr><td class=\"attr-name\">[2]</td><td class = \"attrvalue\">--temp_location=gs://ai-analytics-solutions-kfpdemo/noaa_similar_reports/tmp</td></tr><tr><td class=\"attr-name\">[3]</td><td class = \"attrvalue\">--region=us-west1</td></tr><tr><td class=\"attr-name\">[4]</td><td class = \"attrvalue\">--disk_size_gb=50</td></tr><tr><td class=\"attr-name\">[5]</td><td class = \"attrvalue\">--experiments=shuffle_mode=auto</td></tr><tr><td class=\"attr-name\">[6]</td><td class = \"attrvalue\">--machine_type=n1-standard-8</td></tr><tr><td class=\"attr-name\">[7]</td><td class = \"attrvalue\">--extra_package=/tmp/tmpmsmd214z/build/tfx/dist/tfx_ephemeral-0.22.1.tar.gz</td></tr><tr><td class=\"attr-name\">[8]</td><td class = \"attrvalue\">--labels</td></tr><tr><td class=\"attr-name\">[9]</td><td class = \"attrvalue\">tfx_executor=-components-example_gen-big_query_example_gen-executor-executor</td></tr><tr><td class=\"attr-name\">[10]</td><td class = \"attrvalue\">--labels</td></tr><tr><td class=\"attr-name\">[11]</td><td class = \"attrvalue\">tfx_py_version=3-7</td></tr><tr><td class=\"attr-name\">[12]</td><td class = \"attrvalue\">--labels</td></tr><tr><td class=\"attr-name\">[13]</td><td class = \"attrvalue\">tfx_version=0-22-1</td></tr></table></td></tr></table></td></tr></table></div></td></tr><tr><td class=\"attr-name\">.component.inputs</td><td class = \"attrvalue\">{}</td></tr><tr><td class=\"attr-name\">.component.outputs</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['examples']</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'Examples'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f1f7786a7d0</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">Examples</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'Examples'</span> (uri: /tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/BigQueryExampleGen/examples/1)<span class=\"deemphasize\"> at 0x7f1f800ca450</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class 'tfx.types.standard_artifacts.Examples'&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/BigQueryExampleGen/examples/1</td></tr><tr><td class=\"attr-name\">.span</td><td class = \"attrvalue\">0</td></tr><tr><td class=\"attr-name\">.split_names</td><td class = \"attrvalue\">[\"train\", \"eval\"]</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr></table></td></tr></table></div>"
      ],
      "text/plain": [
       "ExecutionResult(\n",
       "    component_id: BigQueryExampleGen\n",
       "    execution_id: 1\n",
       "    outputs:\n",
       "        examples: Channel(\n",
       "            type_name: Examples\n",
       "            artifacts: [Artifact(type_name: Examples, uri: /tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/BigQueryExampleGen/examples/1, id: 1)]\n",
       "        ))"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "## skip_for_export\n",
    "context.show(ingest_result)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "ExecutionResult(\n",
      "    component_id: BigQueryExampleGen\n",
      "    execution_id: 1\n",
      "    outputs:\n",
      "        examples: Channel(\n",
      "            type_name: Examples\n",
      "            artifacts: [Artifact(type_name: Examples, uri: /tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/BigQueryExampleGen/examples/1, id: 1)]\n",
      "        ))\n"
     ]
    }
   ],
   "source": [
    "## skip_for_export\n",
    "print(ingest_result)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Validate the data\n",
    "\n",
    "Let's generate statistics from the data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "from tfx.components import StatisticsGen\n",
    "stats_gen = StatisticsGen(examples=example_gen.outputs['examples'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object expanded\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">ExecutionResult</span><span class=\"deemphasize\"> at 0x7f1f7567e050</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.execution_id</td><td class = \"attrvalue\">2</td></tr><tr><td class=\"attr-name\">.component</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">StatisticsGen</span><span class=\"deemphasize\"> at 0x7f1f7566a210</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.inputs</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['examples']</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'Examples'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f1f7786a7d0</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">Examples</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'Examples'</span> (uri: /tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/BigQueryExampleGen/examples/1)<span class=\"deemphasize\"> at 0x7f1f800ca450</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class 'tfx.types.standard_artifacts.Examples'&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/BigQueryExampleGen/examples/1</td></tr><tr><td class=\"attr-name\">.span</td><td class = \"attrvalue\">0</td></tr><tr><td class=\"attr-name\">.split_names</td><td class = \"attrvalue\">[\"train\", \"eval\"]</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr></table></td></tr><tr><td class=\"attr-name\">.outputs</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['statistics']</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'ExampleStatistics'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f1f7566a3d0</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">ExampleStatistics</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'ExampleStatistics'</span> (uri: /tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/StatisticsGen/statistics/2)<span class=\"deemphasize\"> at 0x7f1f7566ae90</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class 'tfx.types.standard_artifacts.ExampleStatistics'&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/StatisticsGen/statistics/2</td></tr><tr><td class=\"attr-name\">.span</td><td class = \"attrvalue\">0</td></tr><tr><td class=\"attr-name\">.split_names</td><td class = \"attrvalue\">[\"train\", \"eval\"]</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr></table></td></tr><tr><td class=\"attr-name\">.exec_properties</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['stats_options_json']</td><td class = \"attrvalue\">None</td></tr></table></td></tr></table></div></td></tr><tr><td class=\"attr-name\">.component.inputs</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['examples']</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'Examples'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f1f7786a7d0</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">Examples</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'Examples'</span> (uri: /tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/BigQueryExampleGen/examples/1)<span class=\"deemphasize\"> at 0x7f1f800ca450</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class 'tfx.types.standard_artifacts.Examples'&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/BigQueryExampleGen/examples/1</td></tr><tr><td class=\"attr-name\">.span</td><td class = \"attrvalue\">0</td></tr><tr><td class=\"attr-name\">.split_names</td><td class = \"attrvalue\">[\"train\", \"eval\"]</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr></table></td></tr><tr><td class=\"attr-name\">.component.outputs</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['statistics']</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'ExampleStatistics'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f1f7566a3d0</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">ExampleStatistics</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'ExampleStatistics'</span> (uri: /tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/StatisticsGen/statistics/2)<span class=\"deemphasize\"> at 0x7f1f7566ae90</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class 'tfx.types.standard_artifacts.ExampleStatistics'&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/StatisticsGen/statistics/2</td></tr><tr><td class=\"attr-name\">.span</td><td class = \"attrvalue\">0</td></tr><tr><td class=\"attr-name\">.split_names</td><td class = \"attrvalue\">[\"train\", \"eval\"]</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr></table></td></tr></table></div>"
      ],
      "text/plain": [
       "ExecutionResult(\n",
       "    component_id: StatisticsGen\n",
       "    execution_id: 2\n",
       "    outputs:\n",
       "        statistics: Channel(\n",
       "            type_name: ExampleStatistics\n",
       "            artifacts: [Artifact(type_name: ExampleStatistics, uri: /tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/StatisticsGen/statistics/2, id: 2)]\n",
       "        ))"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "## skip_for_export\n",
    "context.run(stats_gen, beam_pipeline_args=beam_pipeline_args)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [],
   "source": [
    "from tfx.components import SchemaGen\n",
    "# This component only generates a new schema if one doesn't already exist.\n",
    "schema_gen = SchemaGen(statistics=stats_gen.outputs['statistics'],\n",
    "                       infer_feature_shape=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "WARNING:tensorflow:From /opt/conda/lib/python3.7/site-packages/tensorflow_data_validation/utils/stats_util.py:229: tf_record_iterator (from tensorflow.python.lib.io.tf_record) is deprecated and will be removed in a future version.\n",
      "Instructions for updating:\n",
      "Use eager execution and: \n",
      "`tf.data.TFRecordDataset(path)`\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object expanded\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">ExecutionResult</span><span class=\"deemphasize\"> at 0x7f1f757bef90</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.execution_id</td><td class = \"attrvalue\">3</td></tr><tr><td class=\"attr-name\">.component</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">SchemaGen</span><span class=\"deemphasize\"> at 0x7f1f7551a190</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.inputs</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['statistics']</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'ExampleStatistics'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f1f7566a3d0</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">ExampleStatistics</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'ExampleStatistics'</span> (uri: /tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/StatisticsGen/statistics/2)<span class=\"deemphasize\"> at 0x7f1f7566ae90</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class 'tfx.types.standard_artifacts.ExampleStatistics'&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/StatisticsGen/statistics/2</td></tr><tr><td class=\"attr-name\">.span</td><td class = \"attrvalue\">0</td></tr><tr><td class=\"attr-name\">.split_names</td><td class = \"attrvalue\">[\"train\", \"eval\"]</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr></table></td></tr><tr><td class=\"attr-name\">.outputs</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['schema']</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'Schema'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f1f75530150</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">Schema</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'Schema'</span> (uri: /tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/SchemaGen/schema/3)<span class=\"deemphasize\"> at 0x7f1f75530110</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class 'tfx.types.standard_artifacts.Schema'&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/SchemaGen/schema/3</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr></table></td></tr><tr><td class=\"attr-name\">.exec_properties</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['infer_feature_shape']</td><td class = \"attrvalue\">True</td></tr></table></td></tr></table></div></td></tr><tr><td class=\"attr-name\">.component.inputs</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['statistics']</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'ExampleStatistics'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f1f7566a3d0</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">ExampleStatistics</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'ExampleStatistics'</span> (uri: /tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/StatisticsGen/statistics/2)<span class=\"deemphasize\"> at 0x7f1f7566ae90</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class 'tfx.types.standard_artifacts.ExampleStatistics'&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/StatisticsGen/statistics/2</td></tr><tr><td class=\"attr-name\">.span</td><td class = \"attrvalue\">0</td></tr><tr><td class=\"attr-name\">.split_names</td><td class = \"attrvalue\">[\"train\", \"eval\"]</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr></table></td></tr><tr><td class=\"attr-name\">.component.outputs</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['schema']</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'Schema'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f1f75530150</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">Schema</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'Schema'</span> (uri: /tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/SchemaGen/schema/3)<span class=\"deemphasize\"> at 0x7f1f75530110</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class 'tfx.types.standard_artifacts.Schema'&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/SchemaGen/schema/3</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr></table></td></tr></table></div>"
      ],
      "text/plain": [
       "ExecutionResult(\n",
       "    component_id: SchemaGen\n",
       "    execution_id: 3\n",
       "    outputs:\n",
       "        schema: Channel(\n",
       "            type_name: Schema\n",
       "            artifacts: [Artifact(type_name: Schema, uri: /tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/SchemaGen/schema/3, id: 3)]\n",
       "        ))"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "## skip_for_export\n",
    "context.run(schema_gen, beam_pipeline_args=beam_pipeline_args)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [],
   "source": [
    "from tfx.components import ExampleValidator\n",
    "\n",
    "example_validator = ExampleValidator(\n",
    "    statistics=stats_gen.outputs['statistics'],\n",
    "    schema=schema_gen.outputs['schema']\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object expanded\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">ExecutionResult</span><span class=\"deemphasize\"> at 0x7f1f75ee6210</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.execution_id</td><td class = \"attrvalue\">4</td></tr><tr><td class=\"attr-name\">.component</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">ExampleValidator</span><span class=\"deemphasize\"> at 0x7f1f755339d0</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.inputs</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['statistics']</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'ExampleStatistics'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f1f7566a3d0</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">ExampleStatistics</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'ExampleStatistics'</span> (uri: /tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/StatisticsGen/statistics/2)<span class=\"deemphasize\"> at 0x7f1f7566ae90</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class 'tfx.types.standard_artifacts.ExampleStatistics'&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/StatisticsGen/statistics/2</td></tr><tr><td class=\"attr-name\">.span</td><td class = \"attrvalue\">0</td></tr><tr><td class=\"attr-name\">.split_names</td><td class = \"attrvalue\">[\"train\", \"eval\"]</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr><tr><td class=\"attr-name\">['schema']</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'Schema'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f1f75530150</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">Schema</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'Schema'</span> (uri: /tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/SchemaGen/schema/3)<span class=\"deemphasize\"> at 0x7f1f75530110</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class 'tfx.types.standard_artifacts.Schema'&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/SchemaGen/schema/3</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr></table></td></tr><tr><td class=\"attr-name\">.outputs</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['anomalies']</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'ExampleAnomalies'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f1f75533c50</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">ExampleAnomalies</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'ExampleAnomalies'</span> (uri: /tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/ExampleValidator/anomalies/4)<span class=\"deemphasize\"> at 0x7f1f75533ad0</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class 'tfx.types.standard_artifacts.ExampleAnomalies'&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/ExampleValidator/anomalies/4</td></tr><tr><td class=\"attr-name\">.span</td><td class = \"attrvalue\">0</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr></table></td></tr><tr><td class=\"attr-name\">.exec_properties</td><td class = \"attrvalue\">{}</td></tr></table></div></td></tr><tr><td class=\"attr-name\">.component.inputs</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['statistics']</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'ExampleStatistics'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f1f7566a3d0</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">ExampleStatistics</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'ExampleStatistics'</span> (uri: /tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/StatisticsGen/statistics/2)<span class=\"deemphasize\"> at 0x7f1f7566ae90</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class 'tfx.types.standard_artifacts.ExampleStatistics'&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/StatisticsGen/statistics/2</td></tr><tr><td class=\"attr-name\">.span</td><td class = \"attrvalue\">0</td></tr><tr><td class=\"attr-name\">.split_names</td><td class = \"attrvalue\">[\"train\", \"eval\"]</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr><tr><td class=\"attr-name\">['schema']</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'Schema'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f1f75530150</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">Schema</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'Schema'</span> (uri: /tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/SchemaGen/schema/3)<span class=\"deemphasize\"> at 0x7f1f75530110</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class 'tfx.types.standard_artifacts.Schema'&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/SchemaGen/schema/3</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr></table></td></tr><tr><td class=\"attr-name\">.component.outputs</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['anomalies']</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'ExampleAnomalies'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f1f75533c50</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">ExampleAnomalies</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'ExampleAnomalies'</span> (uri: /tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/ExampleValidator/anomalies/4)<span class=\"deemphasize\"> at 0x7f1f75533ad0</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class 'tfx.types.standard_artifacts.ExampleAnomalies'&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/ExampleValidator/anomalies/4</td></tr><tr><td class=\"attr-name\">.span</td><td class = \"attrvalue\">0</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr></table></td></tr></table></div>"
      ],
      "text/plain": [
       "ExecutionResult(\n",
       "    component_id: ExampleValidator\n",
       "    execution_id: 4\n",
       "    outputs:\n",
       "        anomalies: Channel(\n",
       "            type_name: ExampleAnomalies\n",
       "            artifacts: [Artifact(type_name: ExampleAnomalies, uri: /tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/ExampleValidator/anomalies/4, id: 4)]\n",
       "        ))"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "## skip_for_export\n",
    "context.run(example_validator, beam_pipeline_args=beam_pipeline_args)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Preprocess data\n",
    "\n",
    "Let's preprocess the comments:\n",
    "* Pull out the office name from the comment. It's the last part of the comment (BMX)\n",
    "* Lower case the comment"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 76,
   "metadata": {},
   "outputs": [],
   "source": [
    "#%%writefile preprocess.py\n",
    "\n",
    "import tensorflow_hub as hub\n",
    "swivel = hub.load(\"https://tfhub.dev/google/tf2-preview/gnews-swivel-20dim/1\")\n",
    "\n",
    "def preprocessing_fn(inputs):\n",
    "    import tensorflow as tf\n",
    "    \n",
    "    outputs = inputs.copy()\n",
    "    comments = inputs['comments']\n",
    "    outputs['office'] = tf.strings.substr(comments, -4, 3)\n",
    "    comments = tf.strings.regex_replace(comments, r\"\\([A-Z]+\\)$\", \"\")\n",
    "    outputs['comments'] = tf.strings.lower(comments)\n",
    "    #if len(outputs['comments'].shape) == 0:\n",
    "    #    swivel_input = [outputs['comments']]\n",
    "    #else:\n",
    "    #    swivel_input = outputs['comments']\n",
    "    #outputs['embed'] = swivel(swivel_input)\n",
    "    return outputs"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 77,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "A NWS STORM SURVEY TEAM CONFIRMED A TORNADO OF EF-1 INTENSITY... AFFECTING AREAS JUST SOUTHEAST OF ROCKFORD IN COOSA COUNTY ALONG COUNTY ROAD 101. (BMX)\n",
      "year                                                       2019\n",
      "julian_day                                                   19\n",
      "latitude                                                  32.85\n",
      "longitude                                                -86.15\n",
      "comments      tf.Tensor(b'a nws storm survey team confirmed ...\n",
      "type                                                    tornado\n",
      "office                tf.Tensor(b'BMX', shape=(), dtype=string)\n",
      "Name: 3, dtype: object\n",
      "tf.Tensor(b'a nws storm survey team confirmed a tornado of ef-1 intensity... affecting areas just southeast of rockford in coosa county along county road 101. ', shape=(), dtype=string)\n"
     ]
    }
   ],
   "source": [
    "## skip_for_export\n",
    "inputs = df[:].iloc[3]\n",
    "print(inputs['comments'])\n",
    "outputs = preprocessing_fn(inputs)\n",
    "print(outputs)\n",
    "print(outputs['comments'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 78,
   "metadata": {},
   "outputs": [],
   "source": [
    "import tensorflow_transform as tft\n",
    "from tfx.components import Transform\n",
    "transform = Transform(\n",
    "    examples=example_gen.outputs['examples'],\n",
    "    schema=schema_gen.outputs['schema'],\n",
    "    module_file=os.path.abspath('preprocess.py')\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 79,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object expanded\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">ExecutionResult</span><span class=\"deemphasize\"> at 0x7f1f75fcabd0</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.execution_id</td><td class = \"attrvalue\">12</td></tr><tr><td class=\"attr-name\">.component</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Transform</span><span class=\"deemphasize\"> at 0x7f1f75605610</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.inputs</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['examples']</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'Examples'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f1f7786a7d0</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">Examples</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'Examples'</span> (uri: /tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/BigQueryExampleGen/examples/1)<span class=\"deemphasize\"> at 0x7f1f800ca450</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class 'tfx.types.standard_artifacts.Examples'&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/BigQueryExampleGen/examples/1</td></tr><tr><td class=\"attr-name\">.span</td><td class = \"attrvalue\">0</td></tr><tr><td class=\"attr-name\">.split_names</td><td class = \"attrvalue\">[\"train\", \"eval\"]</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr><tr><td class=\"attr-name\">['schema']</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'Schema'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f1f75530150</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">Schema</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'Schema'</span> (uri: /tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/SchemaGen/schema/3)<span class=\"deemphasize\"> at 0x7f1f75530110</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class 'tfx.types.standard_artifacts.Schema'&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/SchemaGen/schema/3</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr></table></td></tr><tr><td class=\"attr-name\">.outputs</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['transform_graph']</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'TransformGraph'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f1f75605650</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">TransformGraph</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'TransformGraph'</span> (uri: /tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/Transform/transform_graph/12)<span class=\"deemphasize\"> at 0x7f1f75605d10</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class 'tfx.types.standard_artifacts.TransformGraph'&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/Transform/transform_graph/12</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr><tr><td class=\"attr-name\">['transformed_examples']</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'Examples'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f1f75605410</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">Examples</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'Examples'</span> (uri: /tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/Transform/transformed_examples/12)<span class=\"deemphasize\"> at 0x7f1f75605c90</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class 'tfx.types.standard_artifacts.Examples'&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/Transform/transformed_examples/12</td></tr><tr><td class=\"attr-name\">.span</td><td class = \"attrvalue\">0</td></tr><tr><td class=\"attr-name\">.split_names</td><td class = \"attrvalue\">[\"train\", \"eval\"]</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr></table></td></tr><tr><td class=\"attr-name\">.exec_properties</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['module_file']</td><td class = \"attrvalue\">/home/jupyter/ml-design-patterns/06_reproducibility/storm_reports/preprocess.py</td></tr><tr><td class=\"attr-name\">['preprocessing_fn']</td><td class = \"attrvalue\">None</td></tr></table></td></tr></table></div></td></tr><tr><td class=\"attr-name\">.component.inputs</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['examples']</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'Examples'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f1f7786a7d0</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">Examples</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'Examples'</span> (uri: /tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/BigQueryExampleGen/examples/1)<span class=\"deemphasize\"> at 0x7f1f800ca450</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class 'tfx.types.standard_artifacts.Examples'&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/BigQueryExampleGen/examples/1</td></tr><tr><td class=\"attr-name\">.span</td><td class = \"attrvalue\">0</td></tr><tr><td class=\"attr-name\">.split_names</td><td class = \"attrvalue\">[\"train\", \"eval\"]</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr><tr><td class=\"attr-name\">['schema']</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'Schema'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f1f75530150</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">Schema</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'Schema'</span> (uri: /tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/SchemaGen/schema/3)<span class=\"deemphasize\"> at 0x7f1f75530110</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class 'tfx.types.standard_artifacts.Schema'&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/SchemaGen/schema/3</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr></table></td></tr><tr><td class=\"attr-name\">.component.outputs</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['transform_graph']</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'TransformGraph'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f1f75605650</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">TransformGraph</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'TransformGraph'</span> (uri: /tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/Transform/transform_graph/12)<span class=\"deemphasize\"> at 0x7f1f75605d10</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class 'tfx.types.standard_artifacts.TransformGraph'&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/Transform/transform_graph/12</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr><tr><td class=\"attr-name\">['transformed_examples']</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'Examples'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f1f75605410</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">Examples</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
       ".tfx-object.expanded {\n",
       "  padding: 4px 8px 4px 8px;\n",
       "  background: white;\n",
       "  border: 1px solid #bbbbbb;\n",
       "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
       "}\n",
       ".tfx-object, .tfx-object * {\n",
       "  font-size: 11pt;\n",
       "}\n",
       ".tfx-object > .title {\n",
       "  cursor: pointer;\n",
       "}\n",
       ".tfx-object .expansion-marker {\n",
       "  color: #999999;\n",
       "}\n",
       ".tfx-object.expanded > .title > .expansion-marker:before {\n",
       "  content: '▼';\n",
       "}\n",
       ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
       "  content: '▶';\n",
       "}\n",
       ".tfx-object .class-name {\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object .deemphasize {\n",
       "  opacity: 0.5;\n",
       "}\n",
       ".tfx-object.collapsed > table.attr-table {\n",
       "  display: none;\n",
       "}\n",
       ".tfx-object.expanded > table.attr-table {\n",
       "  display: block;\n",
       "}\n",
       ".tfx-object table.attr-table {\n",
       "  border: 2px solid white;\n",
       "  margin-top: 5px;\n",
       "}\n",
       ".tfx-object table.attr-table td.attr-name {\n",
       "  vertical-align: top;\n",
       "  font-weight: bold;\n",
       "}\n",
       ".tfx-object table.attr-table td.attrvalue {\n",
       "  text-align: left;\n",
       "}\n",
       "</style>\n",
       "<script>\n",
       "function toggleTfxObject(element) {\n",
       "  var objElement = element.parentElement;\n",
       "  if (objElement.classList.contains('collapsed')) {\n",
       "    objElement.classList.remove('collapsed');\n",
       "    objElement.classList.add('expanded');\n",
       "  } else {\n",
       "    objElement.classList.add('collapsed');\n",
       "    objElement.classList.remove('expanded');\n",
       "  }\n",
       "}\n",
       "</script>\n",
       "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'Examples'</span> (uri: /tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/Transform/transformed_examples/12)<span class=\"deemphasize\"> at 0x7f1f75605c90</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class 'tfx.types.standard_artifacts.Examples'&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/Transform/transformed_examples/12</td></tr><tr><td class=\"attr-name\">.span</td><td class = \"attrvalue\">0</td></tr><tr><td class=\"attr-name\">.split_names</td><td class = \"attrvalue\">[\"train\", \"eval\"]</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr></table></td></tr></table></div>"
      ],
      "text/plain": [
       "ExecutionResult(\n",
       "    component_id: Transform\n",
       "    execution_id: 12\n",
       "    outputs:\n",
       "        transform_graph: Channel(\n",
       "            type_name: TransformGraph\n",
       "            artifacts: [Artifact(type_name: TransformGraph, uri: /tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/Transform/transform_graph/12, id: 15)]\n",
       "        )\n",
       "        transformed_examples: Channel(\n",
       "            type_name: Examples\n",
       "            artifacts: [Artifact(type_name: Examples, uri: /tmp/tfx-interactive-2020-09-20T16_54_23.892298-by3sqlj6/Transform/transformed_examples/12, id: 16)]\n",
       "        ))"
      ]
     },
     "execution_count": 79,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "## skip_for_export\n",
    "context.run(transform, beam_pipeline_args=beam_pipeline_args)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Copyright 2020 Google Inc. Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License"
   ]
  }
 ],
 "metadata": {
  "environment": {
   "name": "tf2-gpu.2-1.m54",
   "type": "gcloud",
   "uri": "gcr.io/deeplearning-platform-release/tf2-gpu.2-1:m54"
  },
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
